package lu.med.praxiswahl.wahlumed.client.patienten;

// Echo und E-Grav Unterpanel der Patientmaske - Dokumentation

import java.awt.BorderLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import javax.swing.JPanel;
import javax.swing.JTabbedPane;

import lu.med.praxiswahl.wahlumed.client.utilities.TabbedPaneColorChangeListener;
import lu.med.praxiswahl.wahlumed.client.wclient.Main;
import lu.med.praxiswahl.wahlumed.client.wclient.PatientenSuchmaske;


/**
 * 
 * @author Lars Holger Roth
 */

@SuppressWarnings("serial")
public class EPanel extends JPanel implements ActionListener
{
    private JTabbedPane tabbedPane;
    private EchoPanel echoPanel;
    private EGravPanel egravPanel;
    
    public EPanel(Main dataManager, PatientenPanel owner, PatientenSuchmaske pm, JTabbedPane tabbedPane)
    {
	super(new BorderLayout());

	this.tabbedPane = tabbedPane;
	JTabbedPane jtp = new JTabbedPane();

	// Echo
	echoPanel = new EchoPanel(dataManager, owner, pm, this.tabbedPane);

	// E-Grav
	egravPanel = new EGravPanel(dataManager, pm, this.tabbedPane);

	jtp.add("E-Grav", egravPanel);
	jtp.add("Echo", echoPanel);
	jtp.addChangeListener(new TabbedPaneColorChangeListener(jtp));

	this.add(jtp, BorderLayout.CENTER);
    }

    @Override
    public void actionPerformed(ActionEvent e)
    {
	// do nothing
    }

    /**
     * @return the echoPanel
     */
    public EchoPanel getEchoPanel()
    {
        return echoPanel;
    }

    /**
     * @param echoPanel the echoPanel to set
     */
    public void setEchoPanel(EchoPanel echoPanel)
    {
        this.echoPanel = echoPanel;
    }

    /**
     * @return the egravPanel
     */
    public EGravPanel getEgravPanel()
    {
        return egravPanel;
    }

    /**
     * @param egravPanel the egravPanel to set
     */
    public void setEgravPanel(EGravPanel egravPanel)
    {
        this.egravPanel = egravPanel;
    }
}
